import Navbar from "@/component/navbar";
import Tabbar from "@/component/tabbar";
import Login from "@/pages/login";
import Work from "@/pages/work";
import Schedule from "@/pages/schedule";
import AddressBook from "@/pages/address-book";
import Mine from "@/pages/mine";
const routes = [
  { path: "/", redirect: "/login" },
  // 因为是后台系统，所以默认到登陆页面，并且登录之后的其它页面都应该要鉴权(通用鉴权--用户是否已经登录)
  // 可以使用meta来指定一些特定的不需要鉴权的路由，其它路由不配置就表示要鉴权
  { path: "/login", component: Login, meta: { nologin: true } },

  {
    path: "/work",
    components: {
      header: Navbar,
      default: Work,
      footer: Tabbar,
    },
    meta: {
      title: "办公",
      icon: "newspaper-o",
      icon1: "search",
      icon2: "scan",
      inTabber: true,
    },
  },
  {
    path: "/schedule",
    components: {
      header: Navbar,
      default: Schedule,
      footer: Tabbar,
    },
    meta: {
      title: "日程",
      icon: "newspaper-o",
      icon1: "search",
      icon2: "filter-o",
      inTabber: true,
    },
  },
  {
    path: "/addressBook",
    components: {
      header: Navbar,
      default: AddressBook,
      footer: Tabbar,
    },
    meta: {
      title: "通讯录",
      icon: "phone-o",
      inTabber: true,
    },
  },
  {
    path: "/mine",
    components: {
      header: Navbar,
      default: Mine,
      footer: Tabbar,
    },
    meta: {
      title: "我的",
      icon: "user-o",
      icon2: "setting-o",
      inTabber: true,
    },
  },

  // {path: '/home', component: Home},
  // {path: '/purchase/list', component: PurchaseList},
  // {path: '/purchase/edit', component: PurchaseEdit},
  // {path: '/setting', component: Setting}
];
export default routes;
